package com.gilgamesh.mall.sdk.client.member;

import com.gilgamesh.mall.sdk.bean.member.UserEntity;
import com.gilgamesh.mall.sdk.dto.ResponseDTO;
import com.gilgamesh.mall.sdk.dto.member.UserDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yanm
 * @date 2021/1/12 17:06
 **/
@RestController
@RequestMapping("api/member")
public interface UserClient {

    @PostMapping("add")
    ResponseDTO<Integer> add(@RequestBody UserEntity user);

    @PostMapping("login")
    ResponseDTO<UserDTO> check(@RequestParam(value="number",required=false)String number,
                               @RequestParam(value="password",required = false)String password);
    @PostMapping("geMailVerifiCode")
    ResponseDTO<String> geMailVerifiCode(@RequestParam(value="mail",required = false)String mail,
                                         @RequestParam(value="password",required = false)String password);
    @PostMapping("verifiyAndRegisterMail")
    ResponseDTO<Integer> verifiyAndRegisterMail(@RequestParam(value="mail",required = false)String mail,
                                                @RequestParam(value="password",required = false)String password,
                                                @RequestParam(value="verifiCode",required = false)String verifiCode);
    @PostMapping("registerByPhone")
    ResponseDTO<Integer> registerByPhone(@RequestParam(value="phoneNumber",required = false)String phoneNumber,
                                         @RequestParam(value="password",required = false)String password);

    @GetMapping("queryMail")
    ResponseDTO<Integer> queryMail(@RequestParam(value="mail",required = false)String mail);




}
